package com.example.basicsecurity.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import static com.example.basicsecurity.constant.Constant.LOGIN_PAGE;
import static com.example.basicsecurity.constant.Constant.LOGIN_PROCESSING_URL;

/**
 * @author 罗俊华
 * @date 2021/11/9 - 4:04 下午
 */
@Controller
@RequestMapping(LOGIN_PAGE)
public class LoginController {

    @GetMapping
    public ModelAndView login(){
        ModelAndView modelAndView = new ModelAndView("loginPage");
        modelAndView.addObject("loginProcessingUrlAddress",LOGIN_PROCESSING_URL);
        return modelAndView;
    }
}
